package com.yhsoft.buyer.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 购物车商品表
 * </p>
 *
 * @author yyyyyyyh
 * @since 2023-10-17
 */
@TableName("buyer_cart_sku")
@Data
public class BuyerCartSku implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 购物车ID
     */
    private Integer cartId;

    /**
     * 用户ID
     */
    private String userId;

    /**
     * 商品ID
     */
    private Integer goodsId;

    /**
     * skuID
     */
    private Integer skuId;

    /**
     * sku_name
     */
    private String skuName;

    private String skuInfo;

    /**
     * sku商品数量
     */
    private Integer skuQuantity;

    /**
     * 添加购物车时商品价格
     */
    private BigDecimal skuPrice;

    /**
     * 添加购物车时的商品原价
     */
    private BigDecimal originalPrice;

    /**
     * 添加购物车时的渠道商进货价
     */
    private BigDecimal salerPrice;

    /**
     * 逻辑删除
     */
    private Integer deleted;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private LocalDateTime updatedTime;

}
